//
//  LAGGeometryTypes.h
//  LAMapBasicDemo
//
//  Created by 罗亮富 on 2017/10/15.
//  Copyright © 2017年 2Bulu. All rights reserved.
//

//#warning use new

#ifndef LAGGemotryTypes_h
#define LAGGemotryTypes_h


#include <stdio.h>
#include <stdbool.h>
#include <ctype.h>
#include <stddef.h>

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
#else

typedef unsigned int NSUInteger;
typedef double NSTimeInterval;
typedef double CLLocationDegrees;
typedef double CLLocationDistance;

struct CLLocationCoordinate2D {
    double latitude;
    double longitude;
};
typedef struct CLLocationCoordinate2D CLLocationCoordinate2D;

typedef struct {
    double x;
    double y;
} MKMapPoint;

typedef struct {
    double width;
    double height;
} MKMapSize;

typedef struct {
    MKMapPoint origin;
    MKMapSize size;
} MKMapRect;

#endif

#define EARTH_R 6378137.0

#pragma pack(1)
typedef struct {
    double latitude;
    double longitude;
}LocationCoordinateType;
//下面的结构不能够改变，否则会影响到历史数据，位置坐标点信息
typedef struct {
    double latitude;
    double longitude;
    double altitude;
    double speed;
    double accuracy; //horizonal acuracy
    double timeInterval; //unix time unit
}LocationPointType;

typedef struct {
    int pointsCount;
    LocationPointType *dataBuffer;
}LocationPointsSegmentType;

//里程碑结构体
typedef struct {
    NSUInteger mile;   //公里
    double    latitude;
    double    longitude;
} Milepost_Type;

#pragma pack()

#define DEGREES_TO_RADIANS(__ANGLE) ((__ANGLE) * M_PI / 180.0)
#define RADIANS_TO_DEGREES(__RADIAN) ((__RADIAN) *  180.0/ M_PI)



#endif /* LAGGemotry_h */


